<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/ZendSkeletonModule for the canonical source repository
 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace TestModule;

use Zend\Mvc\ModuleRouteListener;

use TestModule\Model\UserTable;
use TestModule\Model\Entity\User;
use Zend\Db\ResultSet\ResultSet;
use Zend\Db\TableGateway\TableGateway;

class Module
{
    public function getAutoloaderConfig()
    {
        return array(
            'Zend\Loader\ClassMapAutoloader' => array(
                __DIR__ . '/autoload_classmap.php',
            ),
            'Zend\Loader\StandardAutoloader' => array(
                'namespaces' => array(
		    // if we're in a namespace deeper than one level we need to fix the \ in the path
                    __NAMESPACE__ => __DIR__ . '/src/' . str_replace('\\', '/' , __NAMESPACE__),
                ),
            ),
        );
    }

    public function getConfig()
    {
        return include __DIR__ . '/config/module.config.php';
    }
    
    public function getServiceConfig() 
    {
    	return array(
    			'factories' => array(
    					
    					),
    			
    			);

    }

    public function onBootstrap($e)
    {
        // You may not need to do this if you're doing it elsewhere in your
        // application
        $eventManager        = $e->getApplication()->getEventManager();
        $moduleRouteListener = new ModuleRouteListener();
        $moduleRouteListener->attach($eventManager);
        
        
    }
    
//     public function getViewHelperConfig() 
//     {
//     	return array(
//     				'factories' => array(
// 				    			'request_helper' => function($sm) {
// 				    				$helper = new \TestModule\View\Helper\RequestHelper();
// 				    				$request = $sm->getServiceLocator()->get("Request");
// 				    				$helper->setRequest($request);
// 				    				return $helper;
// 						    	},
						    	
// 					    		'test_helper' => function($sm) {
// 					    			$helper = new \TestModule\View\Helper\TestHelper();
// 					    			return $helper;
// 					    		},
// 					    ),
		    	
// 		    	);
//     }
    
}
